﻿CREATE TRIGGER wfProcessInstances_Tracking_Delete
ON [dbo].[wfProcessInstances] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.wfProcessInstances_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.wfProcessInstances_Tracking s JOIN DELETED i
    ON s.ProcessInstanceID = i.ProcessInstanceID
END











